package com.cn.springcloudwechat.mapper.mapper;

import com.cn.springcloudwechat.model.YmChildGrowth;

import java.util.List;

public interface YmChildGrowthMapper {
    int deleteByPrimaryKey(Long ymGrowthId);

    int insert(YmChildGrowth record);

    int insertSelective(YmChildGrowth record);

    YmChildGrowth selectByPrimaryKey(Long ymGrowthId);

    int updateByPrimaryKeySelective(YmChildGrowth record);

    int updateByPrimaryKey(YmChildGrowth record);

    /**
     * 通过宝宝id查询宝宝成长记录
     * @param childrenId
     * @return
     */
    List<YmChildGrowth> getByChildId(Long childrenId);

    /**
     * 根据userId查询所有孩子成长记录
     * @param userId
     * @return
     */
    List<YmChildGrowth> getYmChildGrowth(Long userId);


    /**
     * 获取宝宝最新成长记录
     * @param childId
     * @return
     */
    YmChildGrowth getNewestYmChildGrowth(Long childId);

}